//统一管理项目用户相关的接口
import request from "../../utils/request"
import type { loginForm, loginResponse, userResponse } from './type'
//项目用户相关的请求地址

enum API {

  LOGIN_URL = '/user/login',

  USERINFO_URL = '/user/info',

  LOGOUT_URL = '/admin/acl/index/logout',

}
//对外暴露接口方法
//登录接口
export const reqLgin = (data: loginForm) => {
  return request<any, loginResponse>({
    url: API.LOGIN_URL,
    method: 'POST',
    data
  })
}
//用户信息接口
export const reqUserAPi = () => request.get<any, userResponse>(API.USERINFO_URL)